<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="类型设置">
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">
                            <div class="toolbor-module search">
                                <a href="addQuestionType.html" class="input-button">+新增类型</a>
                            </div>


                            <div class="toolbor-module search">
                                <div class="formTit">问题类型名称：</div>
                                <input type="text" name="typeName" id="typeName" value="请输入问题类型名称" class="search-value">
                                <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                            </div>
                        </div>


                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form action="" method="post">
                                <table class="data-list">
                                    <tr class="header">
                                        <td>ID</td>
                                        <td>名称</td>
                                        <td>父类</td>
                                        <td>描述</td>
                                        <td>操作</td>
                                    </tr>
                                    <#if param??&&param.typeName??>
                                        <#assign typeName=(param.get("typeName")) >
                                            <#else><#assign typeName='' ></#if>
                                    <#list list as item>
                                        <tr class="s">
                                            <td>${item.id!0}</td>
                                            <td>${item.typeName!''}</td>
                                            <td><#if item.questionType??>${item.questionType.typeName!''}<#else>根目录</#if></td>
                                            <td>${item.comment!''}</td>

                                            <td>
                                                <a class="un" href="/admin/qa/modidyQuestionType.html?id=${item.id!0}&page=${page.currentPage}&typeName=${typeName}">修改</a>
                                                &nbsp;<a class="un" href="#" onclick="javascript:if(confirm( '删除后不可还原，确定删除类型【${item.typeName!''}】？')) href= '/admin/qa/delQuestionType.html?id=${item.id!0}&page=${page.currentPage}&typeName=${typeName}'; else return;">删除</a>
                                            </td>
                                        </tr>
                                    </#list>
                                </table>
                            </form>

                            <!--底部工具栏--{-->
                            <div id="bottomToolbar" class="clearfix">
                                <div class="other-tool">
                                    <dl class="refresh-data">
                                        <dt class="refresh-data-icon"></dt>
                                        <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                    </dl>
                                </div>
                                <!--翻页系统--{-->
                                <div class="container s_formPage">
                                    <#import "../../common/page.html" as pager>
                                        <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                </div>
                                <!--翻页系统--}-->
                            </div>
                            <!--底部工具栏--}-->


                            <script>
                                var url = 'queryQuestionType.html?search=true';

                                function sousuo(){
                                    var sou = "";
                                    var typeName = $("#typeName").val();
                                    if (typeName!=null&&typeName!=""&&typeName!="undefine"&&typeName!="问题类型"){
                                        sou += "&typeName="+typeName;
                                    }
                                    if (sou!=""){
                                        location.href=url+sou;
                                    }
                                }

                                $("#typeName")[0].defaultValue=getQueryString("typeName");
                                function getQueryString(name){
                                    var reg=new  RegExp("(^|&)"+name+"=([^&]*)(&|$)");
                                    var r =window.location.search.substr(1).match(reg);
                                    if(r!=null)
                                        return  decodeURI(r[2]);
                                    return  "请输入问题类型";
                                }
                            </script>
                        </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../foot.html">
    </div>
    <#include "../jsPage.html">
    </body>
</html>